<template>
 <h4>子组件</h4>
 <p>{{ name }}</p>
 <p>{{ price }}</p>
 <p>{{ count }}</p>
</template>

<script setup>
const {name='西瓜',price=2,count} = defineProps(['name','price','count']);
console.log(name,price,count);

</script>

<style scoped>
h4{
    background-color: darkcyan;
}
</style>